﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Blog.Models.Entities;
using MvcEngine.Core.Repositories;
using MvcEngine.Core.Pagination;

namespace MvcEngine.Blog.Repositories
{
    public interface IBlogPostRepository
    {
        BlogPost Get(Guid id);

        BlogPost Get(string postName, Guid blogId, bool onlyVisible);

        IPagination<BlogPost> GetPosts(Guid blogId, int pageNumber, int pageSize, bool isPublished);

        IPagination<BlogPost> GetPosts(Guid blogId, int pageNumber, int pageSize);

        IList<BlogPost> GetPosts(Guid blogId, int count);

        IPagination<BlogPost> GetPostsByTag(Guid tagId, int pageNumber, int pageSize);

        IPagination<BlogPost> GetPostsByCategory(Guid categoryId, int pageNumber, int pageSize);

        void Add(BlogPost post);

        void Update(BlogPost post);

        void Delete(Guid id);

        void DeleteAll(Guid blogId);
    }
}
